package com.liqw.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * Users and global privileges(User)表控制层
 *
 * @author makejava
 * @since 2023-03-06 14:23:38
 */
@Slf4j
@RestController
@RequestMapping("user")
public class UserController {
    
    @Autowired
    JdbcTemplate template;
    
    
    @GetMapping("/queryForList")
    public String queryForList() {
        List<Map<String, Object>> mapList = template.queryForList(" select * from user ");
        return mapList.toString();
    }
    
}

